package com.bree.erp.jsf.view;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import org.apache.log4j.Logger;
import org.primefaces.model.LazyDataModel;

import com.bree.erp.entity.InventoryFlow;
import com.bree.erp.jsf.datatable.LazyBreeDataModel;
import com.bree.erp.service.InventoryFlowService;

@ManagedBean(name="dtInventoryFlowLazyView")
@ViewScoped
public class InventoryFlowLazyView implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private static Logger LOG = Logger.getLogger(InventoryFlowLazyView.class);
	
	@EJB
	private InventoryFlowService ifService;

    private LazyDataModel<InventoryFlow> lazyModel;
    
    @PostConstruct
    public void init() {
    	lazyModel = new LazyBreeDataModel<InventoryFlow, InventoryFlowService, Long>(ifService, 0L);
    }

	/**
	 * @return the lazyModel
	 */
	public LazyDataModel<InventoryFlow> getLazyModel() {
		return lazyModel;
	}
	
	
}
